#pragma once

#include "include/types.h"

// Mode information of the graphics card
struct vesa_mode_info {
  uint8_t pad0[18];
  uint16_t hres; // Horizontal resolution
  uint16_t vres; // Vertical resolution

  uint8_t pad1[3];
  uint8_t bpp; // Pixel Bits
  uint8_t pad2[14];

  uint32_t fbbase; // framebuffer physical starting address
  uint8_t pad3[212];
} __attribute__ ((packed));

struct mode_info {
  uint32_t fbbase; // 0xd0000000
  uint16_t hres; // 0x280
  uint16_t vres; // 0x1e0
  uint8_t bpp; // 0x20
};

void vesa_init();